package com.yiwyn.demo.utils.modify.handle;


import com.yiwyn.demo.utils.modify.anno.modify.ModifyEventField;
import com.yiwyn.demo.utils.modify.anno.modify.ModifyHandleClassField;
import com.yiwyn.demo.utils.modify.handle.router.base.BaseModifyFieldRoute;
import com.yiwyn.demo.utils.modify.handle.router.route.ModifyEventRoute;
import com.yiwyn.demo.utils.modify.handle.router.route.ModifyHandleClassRoute;

import java.util.HashMap;
import java.util.Map;


public class ModifyAnnoHandleRouter {

    public static Map<Class<?>, BaseModifyFieldRoute> handleMap = new HashMap<>();


    static {
        handleMap.put(ModifyHandleClassField.class, new ModifyHandleClassRoute());
        handleMap.put(ModifyEventField.class, new ModifyEventRoute());
    }

    public static BaseModifyFieldRoute getModifyFieldRoute(Class<?> clazz) {
        return handleMap.get(clazz);
    }

    public static boolean containsRoute(Class<?> clazz) {
        return handleMap.containsKey(clazz);
    }


}
